﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IDAL;
using Entity;

namespace SQLServerDAL
{
    /// <summary>
    /// UserRemark 数据层
    /// </summary>
    public class UserRemarkDAL : DataAccess<UserRemark>, IUserRemarkDAL
    {
        #region 常量定义

        private const string TABLE_NAME = "[FH_UserRemark]";
        private const string FIELDS = "*";
        private const string ORDER_BY = "ID DESC";
        #endregion

        /// <summary>
        /// 插入一条用户备注
        /// </summary>
        /// <param name="model">用户备注实体</param>
        /// <returns>操作是否成功</returns>
        public bool Insert(UserRemark model)
        {
            return false;
        }

        /// <summary>
        /// 删除一条用户备注
        /// </summary>
        /// <param name="id">用户备注的记录ID</param>
        /// <returns>操作是否成功</returns>
        public bool Delete(int id)
        {
            return true;
        }

        /// <summary>
        /// 更新用户备注
        /// </summary>
        /// <param name="model">用户备注实体</param>
        /// <returns>操作是否成功</returns>
        public bool Update(UserRemark model)
        {
            return false;
        }

        /// <summary>
        /// 获取一条用户备注信息
        /// </summary>
        /// <param name="id">用户备注的记录ID</param>
        /// <returns>用户备注实体</returns>
        public UserRemark GetById(int id)
        {
            return new UserRemark();
        }

        /// <summary>
        /// 获取用户备注分页列表
        /// </summary>
        /// <param name="pageIndex">索引页</param>
        /// <param name="pageSize">每页显示条数</param>
        /// <param name="total">总记录数</param>
        /// <returns>用户备注实体类集合</returns>
        public IList<UserRemark> GetPagingList(int pageIndex, int pageSize, out int total)
        {
            return base.GetPageDetailNoWhere(db, TABLE_NAME, FIELDS, ORDER_BY, pageSize, pageIndex, out total);
        }
    }
}
